home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
comm
/
lib232.zip
/
INET-OFF.SLT
< prev
next >
Wrap
Text File
|
1990-10-14
|
2KB
|
65 lines
//////////////////////////////// INET-OFF.SLT /////////////////////////////////
//
// DESCRIPTION: This is a sample script which demonstrates the use of the
// Custom Logoff Script function, available in each Liberator Configuration.
// The Liberator will call the Custom Logoff Script when the 'Thanks for
// calling' message (also user-definable) is received from PCBoard. Once the
// script completes, The Liberator will perform Qmail packet maintenance (if
// any is required), and reset the capture file, etc. If you choose not to
// disconnect from PCBoard, the script will not be called.
//
// INSTRUCTIONS: Edit the inet_logoff_command and the delay if necessary,
// then type the name INET-OFF in the Custom Logoff Script option of any
// Configuration (screen 1). You must compile this script before use, by
// typing the command CS INET-OFF from DOS.
int d = 5; // response delay (10ths)
str inet_logoff_command[] = "BYE";
//
//////////////////////////////////////////////////////////////////////////////
main()
{
int t1,
t2,
tmark,
stat;
if (!carrier())
return(0);
t1 = track("iNet command: ", 0);
t2 = track("DATAPAC: call cleared", 0);
tmark = timer_start(1200); // 2 minutes
while (!time_up(tmark) && carrier())
{
terminal();
stat = track_hit(0);
if (stat == t1) // send iNet logoff
{
delay_scr(d);
cputs(inet_logoff_command);
cputc('^M');
}
else if (stat == t2) // call cleared
{
delay_scr(20);
break;
}
}
track_free(0);
timer_free(tmark);
while(carrier()) // continue hanging up, until the connection is broken
{
hangup();
delay_scr(50);
}
}
/////////////////////////////// End of file //////////////////////////////////